import fetch from '@/utils/request';
/**
 *  TenantApi
 */
const TenantApi = {
	/**
	 * 得到店铺
	 * id：店铺对象id
	 */
	get: (id) => fetch.request({
		url: '/api/user/tenant/get',
		method: 'POST',
		data: {
			id: id,
		},
	}),
	/**
	 * 关注店铺 
	 * attention：关注店铺对象
	 */
	attention_tenant: (attention) => fetch.request({
		url: '/api/user/attention/tenant',
		method: 'POST',
		data: {
			attention: attention,
		},
	}),
	/**
	 * 获取关注店铺列表
	 *  query：查询参数对象
	 *  param：分页参数对象
	 */
	tenants: (query, param) => fetch.request({
		url: '/api/user/attention/tenants',
		method: 'POST',
		data: {
			query: query,
			param: param
		},
	}),
	/**
	 * 是否关注店铺
	 * attention：关注店铺对象
	 */
	is_attention: (attention) => fetch.request({
		url: '/api/user/attention/tenant/is',
		method: 'POST',
		data: {
			attention: attention,
		},
	}),
	
	/**
	 * 门店列表
	 */
	stores: (tenantId) => fetch.request({
		url: '/api/user/tenant/stores',
		method: 'POST',
		data: {
			id: tenantId,
		},
	}),
};
export default TenantApi;
